import '../mine/base_res.dart';

class MessageUnreadList extends BaseItem {
  MessageUnreadList({
    this.createdAt,
    this.id,
    this.noReadNum,
    this.preContent,
    this.sendUid,
    this.sessionId,
    this.takeUid,
    this.userAvatar,
    this.userId,
    this.type,
    this.msg_cate,
    this.officialCert,
    this.superUser,
    this.userName,
  });

  MessageUnreadList.fromJson(dynamic json) {
    createdAt = json['createdAt'];
    id = json['id'];
    noReadNum = json['noReadNum'];
    preContent = json['preContent'];
    sendUid = json['sendUid'];
    sessionId = json['sessionId'];
    takeUid = json['takeUid'];
    userAvatar = json['userAvatar'];
    userId = json['userId'];
    type = json['type'] ?? 0;
    userName = json['userName'];
    msg_cate = json['msg_cate'];
    superUser = json['superUser'];
    officialCert = json['officialCert'];
  }
  String? createdAt;
  String? id;
  int? noReadNum;
  String? preContent;
  num? sendUid;
  String? sessionId;
  num? takeUid;
  String? userAvatar;
  num? userId;
  int? type;
  String? userName;
  String? msg_cate;
  bool? superUser; //大V认证
  bool? officialCert; //官方认证
  bool? isVip; //官方认证

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['createdAt'] = createdAt;
    map['id'] = id;
    map['noReadNum'] = noReadNum;
    map['preContent'] = preContent;
    map['sendUid'] = sendUid;
    map['sessionId'] = sessionId;
    map['takeUid'] = takeUid;
    map['userAvatar'] = userAvatar;
    map['userId'] = userId;
    map['type'] = type;
    map['userName'] = userName;
    map['msg_cate'] = msg_cate;
    map['superUser'] = superUser;
    map['officialCert'] = officialCert;
    return map;
  }

  @override
  fromJson(json) {
    MessageUnreadList.fromJson(json);
  }
}
